package com.hong.service_user.controller.api;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hong.fy_common_commomutil.common.result.Result;
import com.hong.fy_model.model.cart.CartEntity;
import com.hong.fy_model.model.user.UserEntity;
import com.hong.service_cart_client.CartFeignClient;
import com.hong.service_user.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;


/**
 * 
 *
 * @author wqh
 * @email 1601709391@qq.com
 * @date 2022-06-16 21:42:56
 */
@RestController
@RequestMapping("/api/user")
@Api(value = "Feign调用接口", tags = "前端不调用")
public class UserApiController {
    @Autowired
    private UserService userService;


    /**
     * 查找用户
     * @param userId
     * @return
     */
    @PostMapping("/findUser/{userId}")
    public UserEntity findUser(@PathVariable Integer userId){
        //根据用户ID查询用户
        UserEntity user = userService.getById(userId);
        return user;

    }


}
